<ui:composition template="/templates/main.xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:c="http://java.sun.com/jsp/jstl/core"
		>
		<ui:define name="navigation">
			<ui:include src="templates/includes/searchForm.xhtml"></ui:include>
		</ui:define>
		<ui:define name="body">
		
		<style>
.tableStyle {
	width: 100%;
}
</style>

			<h:form>
				<rich:dataTable value="#{search.docList}" var="doc" id="searchResult"
					rows="15" width="800" styleClass="tableStyle">
					<rich:column width="200">
						<f:facet name="header">
							<h:outputText value="标  题" />
						</f:facet>

						<h:outputText value="#{doc.title}" />

					</rich:column>
					<rich:column width="200">
						<f:facet name="header">
							<h:outputText value="作  者" />
						</f:facet>
						<h:outputText value="#{doc.author}" />
					</rich:column>
					<rich:column width="200">
						<f:facet name="header">
							<h:outputText value="标  签" />
						</f:facet>
						<h:outputText value="#{doc.label}" style="width: 100px" />
					</rich:column>
					<rich:column width="200">
						<f:facet name="header">
							<h:outputText value="类  别" />
						</f:facet>
						<h:outputText value="#{doc.classify}"
							style="height: 50px; width: 200px" />
					</rich:column>
					<rich:column width="200">
						<f:facet name="header">
							<h:outputText value="主 题" />
						</f:facet>
						<h:outputText value="#{doc.themewords}"
							style="height: 50px; width: 200px" />
					</rich:column>
					<rich:column width="200">
						<f:facet name="header">
							<h:outputText value="关键字" />
						</f:facet>
						<h:outputText value="#{doc.keywords}"
							style="height: 50px; width: 200px" />
					</rich:column>
					<rich:column width="200">
						<f:facet name="header">
							<h:outputText value="创建时间" />
						</f:facet>
						<h:outputText value="#{doc.createtime}"
							style="height: 50px; width: 200px" />
					</rich:column>
					<rich:column algin="center">
						<f:facet name="header">
							<h:outputText value="操作" />
						</f:facet>
						<a href="ShowOne.jsf?id=#{doc.documentid}" target="info" onclick="javascript:show();" >查看</a>
						
						<a href="modifyDocument.jsf?id=#{doc.documentid}" target="info" onclick="javascript:show();" >修改</a>
						
						<a4j:commandLink value=" 删 除 " render="searchResult" action="#{documentBean.delDoucment}">	
							<a4j:param name="documentid" value="#{doc.documentid}"
										assignTo="#{documentBean.documentid}" />
				</a4j:commandLink>
						
						
					</rich:column>
				</rich:dataTable>
				<rich:dataScroller for="searchResult" rendered="true"
					renderIfSinglePage="true" maxPages="5" />
				
			</h:form>
			
		<div id="show" style="width: 800px;height: 600px;">
			<h3 id="titlebar">详细信息</h3>
			<p id="text">
				<iframe align="left"  frameborder="0" name="info" width="780px" height="450px;" />
			</p>
		</div>

		</ui:define>
	</ui:composition>